﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Solution.Business.Entities;

namespace Solution.Data
{
    public class DirectionDAC
    {
        SolutionEntities context = SolutionEntities.Context;
        public List<Direction> Direction_GetByTop(string Top, string Where, string Ord)
        {
            var list = context.Direction_GetByTop(Top, Where, Ord);
            return list.ToList();
        }

        public void Direction_Insert(Direction direction)
        {
            context.Direction_Insert(direction.Name, direction.Order, direction.Active);
        }

        public void Direction_Update(Direction direction)
        {
            context.Direction_Update(direction.DId, direction.Name, direction.Order, direction.Active);
        }
    }
}
